/*
 * c4_exercise10.cpp
 *
 *  Created on: Sep 1, 2013
 *      Author: cyper.yin
 */
#include <iostream>
#include <array>
using namespace std;
/**
 * The 40-yard dash is a sprint covering 40 yards (36.58 m).
 */
int main_c4e10(int argc, char **argv) {
	array<double,3> dashes;

	int i = 3;
	while(i-- > 0){
		cout << "Enter 40-yd dash["<< i << "]:";
		double temp;
		cin >> temp;
		dashes[i] = temp;
	}
	int size = dashes.size();
	cout << "times:" << size << endl;

	double sum = 0;
	for (int i = 0; i < size; ++i) {
		sum += dashes.at(i);
	}
	cout <<"average: " << sum/size << endl;

	return 0;
}




